package com.team.employment.web.admin.controller.statutory;

import com.team.employment.common.result.Result;
import com.team.employment.model.entity.StatutoryInfo;
import com.team.employment.web.admin.dto.StatutoryQueryDto;
import com.team.employment.web.admin.service.CompanyStatutoryService;
import com.team.employment.web.admin.vo.StatutoryCompanyVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Tag(name = "法定人关联信息查询")
@RestController
@RequestMapping("/admin/statutoryRelated")
public class StatutoryRelatedController {

    @Autowired
    private CompanyStatutoryService companyStatutoryService;

    @Operation(summary = "根据statutory_id查看公司名称和公司状态")
    @GetMapping("getInfoById/{id}")
    public Result<List<StatutoryCompanyVo>> getInfoById(@PathVariable Long id){
        List<StatutoryCompanyVo> result = companyStatutoryService.getCompanyInfoByStatutoryId(id);
        return Result.ok(result);
    }

}
